import { reactive } from 'vue'
// import axios from 'axios'
export let appConfig = reactive({})

export async function loadConfig() {
  const response = await fetch(
    `/globalConfig.json?timestamp=${new Date().getTime()}`
  )
  if (!response.ok) {
    console.error('json 配置文件加载失败')
    return
  }
  const config = await response.json()
  Object.assign(appConfig, config) // ✅ 使用 reactive 存储数据
}
